﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Training5
{
    internal class Grade
    {
        private String studentName;
        private double score;

        private String idPass()
        {
            if (score > 60)
            {
                return "通过";
            }
            else if (score < 60 && score >= 0)
            {
                return "不通过";
            } else { return "非法的输入"; }
        }

        public String PrintData()
        {
            return "姓名：" + studentName + ",分数：" + score + ",是否通过：" + this.idPass();
        }

        public void SetStudentName(String studentName)
        {
            this.studentName = studentName;
        }
        public void SetScore(double score)
        {
            this.score = score;
        }

    }
}
